// pages/confirm/pay/pay.js
Page({
  data:{
    isCanShow: 0,
    juan:null
  },
  return: function(){
    wx.reLaunch({
      url: '../../index/index',
    })
  },

  onLoad: function(){
    this.checkIsCanShow();
    this.setData({
      juan: wx.getStorageSync('juan')
    })
    this.juanList()
  },

  /**
   * 获取接口数据，控制是否显示敏感信息
   */
  checkIsCanShow() {
    wx.request({
      url: 'https://order.xiaxueruo.com/api/order/isCanShow/',
      success: res => {
        this.setData({
          isCanShow: res.data
        })
      }
    })
  },

  
 //优惠券接口
 juanList: function(){
  let that = this
  console.log("juan_id:",that.data.juan.juan_id)
  wx.request({
    url: 'https://order.xiaxueruo.com/api/juan/update?juan_id='+that.data.juan.juan_id,
  })
},
})
